﻿using System;
using System.Collections.Generic;
using System.Text;

namespace FlashPay.DAO.Interface
{
    using FlashPay.EF.Models;
    using FlashPay.Entity;
    using FlashPay.Entity.Parameter;
    using FlashPay.Entity.Response.SysAnnouncement;

    /// <summary>
    /// 公告数据接口
    /// </summary>
    public interface SysAnnouncementDao : IDisposable
    {
        /// <summary>
        /// 获取公告列表
        /// </summary>
        /// <returns></returns>
        JResult<SysAnnouncementResponse> Get(int id);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Add(SysAnnouncement model);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        bool Update(SysAnnouncement model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">系统编号</param>
        /// <returns></returns>
        bool Delete(int id);

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <param name="id">系统编号</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        bool UpdateStatus(int id, sbyte status);

        /// <summary>
        /// 更新弹窗
        /// </summary>
        /// <returns></returns>
        bool UpdatePopups(int? announcementId);

        /// <summary>
        /// 获取公告列表
        /// </summary>
        /// <returns></returns>
        JResult<List<SysAnnouncementResponse>> GetList(SysAnnouncementQuery query);
    }
}
